<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="https://cdn.bootcss.com/layer/3.1.0/layer.js"></script>
    <title>百G卡快递单号管理中心-源梦科技提供技术支持</title>
</head>
<body>
<div class="panel panel-primary">
    <div class="panel-heading">
        <h3 class="panel-title" style="text-align: center">
            快递单号管理中心
        </h3>
    </div>
    <div class="panel-body">
        <form class="row" autocomplete="off">
            <div class="alert alert-danger">
                <h4 style="font-weight: bold;">注意：</h4>
                填写时以姓名,快递公司,单号这样的顺序添加！<br>
                单条信息中间用英文逗号","隔开！<br>
                多条信息中间用英文分号";"隔开！<br>
                最后末尾不要加英文分号";"！<br>
                不按此顺序会出现添加失败的情况！
            </div>
        	<div class="alert alert-success">
                <h4 style="font-weight: bold;">提交文本例子：</h4>
                刘轩东,天天,668933818466;赵杰,天天,668933818459;王宏,天天,668933818559
            </div>
            <label for="text"></label>
            <textarea class="form-control" rows="20" id="text" placeholder="姓名,快递公司,单号;" style="width:90%;margin:auto"></textarea>
            <label for="psw"></label>
            <input class="form-control" id="psw" placeholder="管理密码" style="width:90%;margin:auto">
            <label for="search"></label>
            <button type="button" id="search" class="form-control btn-primary" style="width:50%;margin:auto">
                <span class="glyphicon glyphicon-search"> 添加</span>
            </button>
        </form>
        <div id="test"></div>
    </div>
</div>
<hr>
<div style="text-align: center;color: gray">
    Prowed by<a href="http://www.9ykm.cn" target="_blank" style="color: gray"> 源梦科技</a>
</div>
</body>
</html>
<script>
    $(function(){
        $('#search').click(function(){
            var jstext = $('#text').val();
            var jspsw = $('#psw').val();
            if(jstext==""||jspsw=="")
            {
                layer.alert('信息不能为空！')
            }
            else {
                $.post('insert.php', {text: jstext,psw: jspsw}, function (data) {
                    $('#test').html(data);
                })
            }
        })
    })
</script>